package com.webdiy.dao.model;

import org.hibernate.annotations.*;
import org.springframework.beans.factory.annotation.Configurable;

import javax.persistence.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: mabo
 * Date: 2010-1-6
 * Time: 20:08:02
 * To change this template use File | Settings | File Templates.
 * 招聘信息存储表
 */
@Entity
@Table(name = "HR_INFO")
public class HrInfo {

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(name = "ID", length = 32)
    private String id;

    @Column(name = "MAIL", length = 500)
    private String mail;

    @Column(name = "JOB_ID",length = 50)
    private String jobId;

    @Column(name = "JOB_NAME", length = 500)
    private String jobName;//职位名称

    @Column(name = "JOB_DESC", length = 5000)
    private String jobDesc;//职位描述

    @Column(name = "CONTACTS", length = 5000)
    private String contacts;//联系方式

    @Column(name = "COMPANY_NAME", length = 500)
    private String companyName;//公司名称

    @Column(name = "SEND", length = 1)
    private String send = "3";//是否发送（1=发送，2=不发送,3=待选择,4=发送无Email）

    @Column(name = "FINISH", length = 1)
    private String finish = "1";//发送完成(1=未发送，2=发送完成 ,)

    @Column(name = "READY", length = 1)
    private String ready = "1";//准备数据（1=未准备，2=准备完成）

    @Column(name = "JOB_URL", length = 300)
    private String jobUrl;//职位URL

    @Column(name = "ADDRESS", length = 300)
    private String address;//地址

    @Column(name = "PUB_DATE", length = 10)
    private String pubDate;//发布时间

    @Column(name = "CREATE_DATE")
    private Date createDate;//数据创建时间


    @ManyToOne(cascade = {CascadeType.ALL},fetch = FetchType.LAZY)
    @JoinColumn(name = "HR_CONFIG_ID")
    private HrConfig hrConfig;//配置关联，多对一

    public HrInfo() {
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }


    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getSend() {
        return send;
    }

    public void setSend(String send) {
        this.send = send;
    }

    public String getFinish() {
        return finish;
    }

    public void setFinish(String finish) {
        this.finish = finish;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobDesc() {
        return jobDesc;
    }

    public void setJobDesc(String jobDesc) {
        this.jobDesc = jobDesc;
    }

    public String getJobUrl() {
        return jobUrl;
    }

    public void setJobUrl(String jobUrl) {
        this.jobUrl = jobUrl;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getPubDate() {
        return pubDate;
    }

    public void setPubDate(String pubDate) {
        this.pubDate = pubDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getReady() {
        return ready;
    }

    public void setReady(String ready) {
        this.ready = ready;
    }

    public HrConfig getHrConfig() {
        return hrConfig;
    }

    public void setHrConfig(HrConfig hrConfig) {
        this.hrConfig = hrConfig;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }
}
